import 'package:flutter_deer/generated/json/base/json_convert_content.dart';
import 'package:flutter_deer/setting/models/version_entity.dart';

VersionEntity $VersionEntityFromJson(Map<String, dynamic> json) {
  final VersionEntity versionEntity = VersionEntity();
  final int? id = jsonConvert.convert<int>(json['id']);
  if (id != null) {
    versionEntity.id = id;
  }
  final String? platform = jsonConvert.convert<String>(json['platform']);
  if (platform != null) {
    versionEntity.platform = platform;
  }
  final String? versionNum = jsonConvert.convert<String>(json['versionNum']);
  if (versionNum != null) {
    versionEntity.versionNum = versionNum;
  }
  final String? status = jsonConvert.convert<String>(json['status']);
  if (status != null) {
    versionEntity.status = status;
  }
  final String? downloadUrl = jsonConvert.convert<String>(json['downloadUrl']);
  if (downloadUrl != null) {
    versionEntity.downloadUrl = downloadUrl;
  }
  final List<String>? contents = jsonConvert.convert<List<String>>(json['contents']);
  if (contents != null) {
    versionEntity.contents = contents;
  }
  final int? fileSize = jsonConvert.convert<int>(json['fileSize']);
  if (fileSize != null) {
    versionEntity.fileSize = fileSize;
  }
  return versionEntity;
}

Map<String, dynamic> $VersionEntityToJson(VersionEntity entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['id'] = entity.id;
  data['platform'] = entity.platform;
  data['versionNum'] = entity.versionNum;
  data['status'] = entity.status;
  data['downloadUrl'] = entity.downloadUrl;
  data['contents'] = entity.contents;
  data['fileSize'] = entity.fileSize;
  return data;
}